﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain.Entity;
using FluentNHibernate.Mapping;


namespace PropertyManagement.Domain.Mapping.FluentHibernate
{
    public class SystemUserMap : ClassMap<SystemUser>
    {
        public SystemUserMap()
        {
            Table("SystemUser");
            Id(x => x.ID).Column("ID").GeneratedBy.Assigned();
            Map(x => x.UserName).Column("UserName");
            Map(x => x.Password).Column("Password");
            References(x => x.Role).Column("RoleID");
            Map(x => x.CreatedBy).Column("CreatedBy");
            Map(x => x.CreatedDate).Column("CreatedDate");
            Map(x => x.UpdatedBy).Column("UpdatedBy)");
            Map(x => x.UpdatedDate).Column("UpdatedDate");
            Map(x => x.IsActive).Column("IsActive");
            Map(x => x.IsDeleted).Column("IsDeleted");
        }
    }
}
